package com.study.book.controller;


import com.study.book.common.R;
import com.study.book.pojo.Area;
import com.study.book.service.AreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "地区接口")
@RestController
@RequestMapping("/app/area")
public class AreaController {

    @Autowired
    private AreaService areaService;


    @ApiOperation("获取地区列表(深圳地区)")
    @GetMapping("/list")
    public R<List<Area>> list() {
        return R.ok(areaService.list());
    }
}